<!--
 * @Author: your name
 * @Date: 2021-12-20 19:53:46
 * @LastEditTime: 2021-12-22 14:37:27
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \app\src\views\el\betterScroll\index.vue
-->
<template>
  <scroll
    class="wrapper"
    :data="data"
    :pulldown="pulldown"
    @pulldown="loadData"
  >
    <ul class="content">
      <li v-for="item in data" :key="item">{{ item }}</li>
    </ul>
    <div class="loading-wrapper">1111</div>
  </scroll>
</template>
<script>
import scroll from "./aaa.vue";
export default {
  data() {
    return {
      data: [],
      pulldown: true,
    };
  },
  components: { scroll },
  created() {
    this.loadData();
  },
  methods: {
    loadData() {
      setTimeout(() => {
        this.data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
      }, 100);
    },
  },
};
</script>
<style lang="less" scoped>
.wrapper {
  border: 1px solid #ccc;
  // height: 100px;
  // overflow: scroll;
}
</style>